If an error condition occurs, this routine returns an integer
value indicating the type of error. Possible return values are as
follows:
Return Description
0 Successful completion.
[EAGAIN] The system lacks the necessary resources to
initialize the read-write lock.
[EBUSY] The Threads Library has detected an attempt to
reinitialize the read-write lock (a previously
initialized, but not yet destroyed, read-write lock
object).
[EINVAL] The value specified by attr is not a valid attributes
block.
[ENOMEM] Insufficient memory exists to initialize the read-
write lock.
[EPERM] The caller does not have privileges to perform this
operation.